package DesignPattern.Behavior.Observer;

public class Client {
    public static void main(String[] args) {

        // 创建公众号对象
        SubscripitionSubject ss = new SubscripitionSubject();

        // 订阅公众号
        ss.attach(new WeiXinUser("孙悟空"));
        ss.attach(new WeiXinUser("猪无能"));
        ss.attach(new WeiXinUser("啥吴京"));

        // 公众号更新，发消息给订阅者
        ss.notify("更新了！");
    }
}
